package com.qingzhuge.scheduler.entity;

import com.qingzhuge.entity.BasePkLongEntity;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author : zero.xiao
 * @description : 系统中存在的任务对象，通过扫描获得
 * @date :2019-05-17 11:40
 * @modified :
 */
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@RequiredArgsConstructor(staticName = "of")
@Data
@Entity
@Table(name = "sys_task_job")
public class SysTaskJob extends BasePkLongEntity {
    /**任务对象spring bena name*/
    @NonNull
    private String targetObject;
    /**任务方法*/
    @NonNull
    private String targetMethod;
    /**任务名称*/
    private String objectName;
    /**方法名称*/
    private String methodName;

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
